<?php
header("Content-Type: text/html;charset=utf-8"); 
//session_start();





require_once ('../Config/conn.php"');



	$datas = $db->select("user", array(
		"id",
		"username",
		"password"
	), array(
		"id" => 1,
	));

	
	
	
	foreach($datas as $v)
	{
		$id = $v["id"];
		$username = $v["username"];
		$password = $v["password"];
	}


    $_SESSION['id'] = $id;
    $_SESSION['username'] = $username;


    if(md5($_POST['password']) == $password){
		
		  echo "登陆成功！";
		  header("refresh:2;url=index.php");


		
		};



?>